/* Copyright 2009
 *
 * This program and the accompanying materials
 * are made available under the terms of the
 * Eclipse Public License v1.0 which accompanies
 * this distribution, and is available at
 *
 * 		http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in
 * writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
 * OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * Contributors:
 * 	   IBM Corporation - initial API and implementation for JDT/DLTK
 *     Sean W. Quinn - initial adoption for use with PHP from various sources.
 */
package org.eclipse.php.core;

import org.eclipse.dltk.core.IModelStatus;

/**
 * Represents the outcome of an Java model operation. Status objects are used
 * inside <code>JavaModelException</code> objects to indicate what went wrong.
 * <p>
 * Java model status object are distinguished by their plug-in id:
 * <code>getPlugin</code> returns <code>"org.eclipse.jdt.core"</code>.
 * <code>getCode</code> returns one of the status codes declared in
 * <code>IJavaModelStatusConstants</code>.
 * </p>
 * <p>
 * A Java model status may also carry additional information (that is, in
 * addition to the information defined in <code>IStatus</code>):
 * <ul>
 * <li>elements - optional handles to Java elements associated with the failure</li>
 * <li>string - optional string associated with the failure</li>
 * </ul>
 *
 * @see org.eclipse.core.runtime.IStatus
 * @see org.eclipse.jdt.core.IJavaModelStatusConstants
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface IPHPModelStatus extends IModelStatus {

	/**
	 * Returns any Java elements associated with the failure (see specification
	 * of the status code), or an empty array if no elements are related to this
	 * particular status code.
	 *
	 * @return the list of Java element culprits
	 * @see org.eclipse.jdt.core.IJavaModelStatusConstants
	 */
	IPHPElement[] getElements();
}
